import datetime
end_date = datetime.datetime.strptime("2018-5-10","%Y-%m-%d")
datetimenowTime=datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')#现在
begin_date = datetime.datetime.strptime(datetimenowTime, "%Y-%m-%d %H:%M:%S")
print(end_date)
print(datetimenowTime)
print(begin_date)
if begin_date<end_date:
    print('还能用')
else:
    print('不能用')